package com.snail.ron.note;

/**
 * @author xueguoping
 * @desc: TODO
 * @date 2022/3/259:26 AM
 */
public class NoteUtil {
    public static void main(String[] args) {
        String str1 = new StringBuilder("58").append("tongcheng").toString();
        System.out.println(str1);
        System.out.println(str1.intern());
        System.out.println(str1.intern() == str1);

        String str2 = new StringBuffer("ja").append("va").toString();
        System.out.println(str2);
        System.out.println(str2.intern());
        System.out.println(str2.intern() == str2);

        String str3 = "adc";
        System.out.println(str3);
        str3 = str3 + "de";
        System.out.println(str3);
        new StringBuffer(32);
    }
}
